package com.hxci.zhongjiahao.servcie;

import com.hxci.zhongjiahao.dao.UserMapper;
import com.hxci.zhongjiahao.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("zhongjiahaoUserServiceImpl")
public class UserServiceImpl implements UserServcie {
    @Autowired
    private UserMapper dao;

    @Override
    public Integer logion(String name, String pass) {
        // 直接比对明文
        User user = dao.login(name, pass);
        return user == null ? 0 : 1;
    }
}